import { createApp } from 'vue'
import App from './App.vue'
import './styles/index.scss'
import './styles/editor.scss'
import router from './router'
import { useREM } from '@/utils/flexible'
import libs from './libs'
import store from './store'
import xDirectives from './directives/index'
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

import Prism from 'prismjs';
// // highlightjs 核心代码
// import hljs from 'highlight.js/lib/core';
// // 按需引入语言包
// import json from 'highlight.js/lib/languages/json';

// hljs.registerLanguage('json', json);
VueMarkdownEditor.use(vuepressTheme, {
    Prism,
    // config: {
    //     toc: {
    //         includeLevel: [3, 4],
    //     },
    // },
});

// import Vconsole from 'vconsole';
// const vConsole = new Vconsole();
// import moment from "moment"
//设置语言为中文
// moment.locale("zh-cn")
// 注册sbg-icon 固定的格式
import 'virtual:svg-icons-register'
useREM()
createApp(App).use(router).use(store).use(VueMarkdownEditor).use(xDirectives).use(libs).mount('#app')
